import request from "@/utils/request"

/**
 * @description 新增审批流程
 * */
export function addProcess(data) {
  return request({
    url: '/process',
    method: 'post',
    data
  })
}

/**
 * @description 获取审批流程列表
 * */
export function listProcess(query) {
  return request({
    url: '/process',
    method: 'get',
    params: query
  })
}

/**
 * @description 获取审批流详情
 * */
export function detailProcess(code) {
  return request({
    url: '/process/' + code,
    method: 'get'
  })
}

/**
 * @description 编辑审批流程
 * */
export function updateProcess(data) {
  return request({
    url: '/process',
    method: 'put',
    data
  })
}

/**
 * @description 批量删除审批流
 * */
export function deleteProcess(data) {
  return request({
    url: '/process',
    method: 'delete',
    data
  })
}
